import ajax from './ajax'
// 基础路径
const BASE_URL = '/api';

// 账号密码登录
// export const pwdlogin = (username, password, captcha) => fetch(BASE_URL + '/api/loginpwd');
// export const pwdlogin = (username, password, captcha) => fetch('http://127.0.0.1:3000/api/loginpwd');
export const pwdlogin = (username, password, captcha)=> ajax(BASE_URL + '/api/loginpwd', {username, password, captcha}, 'POST');

// 获取图形验证码
export const getcaptcha = () => fetch(BASE_URL + '/api/captcha');

// 请求首页轮播图
export const getHomeCasual = () => fetch(BASE_URL + '/api/homecasual');